<!--  -->
<template>
  <div class="portal">
    <div class="nav">
      <Nav @toGo="changeView"/>
    </div>
    <div class="conts">
     <component :is="currentTabComponent"></component>
    </div>
  </div>
</template>

<script>
import Nav from '@/components/admin/portal/Nav.vue'
import Mana from '@/components/admin/portal/Management.vue'
import Stat from '@/components/admin/portal/Statistical.vue'
export default {
  components: {
    Nav,
      Mana,
      Stat
  },
  data() {
    return {
        currentIndex: 0,
         cards: ['门户管理', '门户统计'],
          arr: ['Mana', 'Stat'],
          isFinshed:true,
          index:0
    }
  },
  created() {},
   methods: {
    changeView(data) {
       this.currentIndex=data
  
    },
  },
 computed: {
    currentTabComponent() {
      return this.arr[this.currentIndex]
    },
  },
}
</script>

<style lang='scss' scoped>
.portal {
  widows: 100%;
  height: 1108px;
background: #F0F2F5;
    .nav{
      width: 100%;
      height: 70px;
      background: #fff;
    }
    .conts{
      width: 100%;
      height: 1050px;
      margin-top: 21px;
      background: #fff;
    }
}
</style>
